package com.easybuilder.core.function.dao;

import com.easybuilder.common.base.dao.BaseDao;
import com.easybuilder.core.function.entity.SysForm;
import org.apache.ibatis.annotations.Delete;
import tk.mybatis.mapper.common.ExampleMapper;
import org.springframework.stereotype.Repository;


@Repository
public interface SysFormDao extends BaseDao<SysForm>, ExampleMapper<SysForm> {

    /** 根据tableId，级联删除form/formItem */
    @Delete("delete from sys_form_item where form_id in (select id from sys_form where table_id = #{id})")
    int casecadeDeleteByTableId(Long id);
}